home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 325 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  955 b 

  1. Path: stern.fokus.gmd.de!news
  2. From: Watson <sayegh@fokus.gmd.de>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: fopen() with a UNIX path?
  5. Date: Thu, 04 Jan 1996 14:19:36 +0100
  6. Organization: GMD FOKUS - Research Institute for Open Communication Systems
  7. Message-ID: <30EBD3E8.3D2F@fokus.gmd.de>
  8. References: <4cflfs$1m@acmez.gatech.edu>
  9. NNTP-Posting-Host: pollux.fokus.gmd.de
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b4 (X11; I; SunOS 5.4 sun4m)
  14.  
  15. David Ward wrote:
  16. >  Hey everyone. Does anyone know why something like this doesn't work?
  17. > main()
  18. >   {
  19. >   FILE  *in;
  20. >   if ( in = fopen ("~/.friends", "r")) == NULL )
  21.  
  22. The character '~' is only interpreted by a shell and will
  23. be - hopefully - expanded to your home directory. A C compiler
  24. won't do that.
  25. -- 
  26. *    Greetinx,
  27.     Watson (sayegh@fokus.gmd.de)
  28.     more personal details at:
  29.     http://www.fokus.gmd.de/ovma/employees/sayegh/entry.html
  30.